package com.itheima.date8;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.Period;

public class Demo09 {

    public static void main(String[] args) {
        LocalDate birthDayOfDang = LocalDate.of(1921, 7, 1);
        LocalDate now = LocalDate.now();
        Period between = Period.between(birthDayOfDang, now);
        System.out.println(between);
        System.out.println(between.getYears());
        System.out.println(between.getMonths());
        System.out.println(between.getDays());
        System.out.println(between.toTotalMonths());

    }
}
